export default {
  setCollapse(state) {
    // 设置侧边栏是否展开
    state.isCollapse = !state.isCollapse;
  },
  setSid(state, sid) {
    // 设置登陆sid
    state.sid = sid;
  },
  setUserData(state, userData) {
    // 设置用户信息
    state.userData = userData;
  },
  // setFns(state, fns) { // 设置用户操作权限
  //     state.fns = fns;
  // },
  setFrontRoute(state, frontRoute) {
    // 设置用户所具有的路由
    let fns = [];
    frontRoute.forEach(item => {
      fns.push(item.frontRoute);
    });
    state.frontRoute = fns;
  },
  setRoutes(state, routes) {
    // 设置用户操作权限
    state.routes = routes;
  },
  setOrginNestingPlatformList(state, orginNestingPlatformList) {
    state.orginNestingPlatformList = orginNestingPlatformList;
  },
  setAllPlatformList(state, allPlatformList) {
    // 设置所有平台信息
    state.allPlatformList = allPlatformList;
  },
  setPlatformList(state, platformList) {
    // 设置发布平台信息
    state.platformList = platformList;
  },
  setWantPlatformList(state, wantPlatformList) {
    // 设置意向平台信息
    state.wantPlatformList = wantPlatformList;
  },
  setSkillList(state, skillList) {
    // 设置才艺信息
    state.skillList = skillList;
  },
  setOrgList(state, orgList) {
    // 设置才艺信息
    state.orgList = orgList;
  },
  setDepartmentList(state, departmentList) {
    // 设置才艺信息
    state.departmentList = departmentList;
  },
  setFunctionList(state, functionList) {
    // 设置才艺信息
    state.functionList = functionList;
  },
  setRoleList(state, roleList) {
    // 设置角色信息
    state.roleList = roleList;
  },
  setCurrentCorporation(state, currentCorporation) {
    // 设置当前公司
    state.currentCorporation = currentCorporation;
  },
  setAllCorporationTile(state, allCorporationTile) {
    // 设置当前所有公司-平铺方式
    state.allCorporationTile = allCorporationTile;
  },
  setWarningCount(state, warningCount) {
    // 缓存顶部已经有的警告数量
    state.warningCount = warningCount;
  },
  setFromRoute(state, fromRoute) {
    // 保存上一个路由，方便强制刷新路由
    state.fromRoute = fromRoute;
  }
};
